package com.thermofisher.dsc.amanda.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by wenjie.yang on 1/17/2019.
 */
@Component
public class WebMvcConfig extends WebMvcConfigurerAdapter {
  @Override
  public void addViewControllers(ViewControllerRegistry registry) {
    registry.addViewController("/company/**").setViewName("/index.html");
    registry.addViewController("/login/**").setViewName("/index.html");
    registry.addViewController("/auth/**").setViewName("/index.html");
    /**
     * client
       product
       customer-product
       product-detail
     */
    //new page routing
    registry.addViewController("/client/**").setViewName("/index.html");
    registry.addViewController("/product/**").setViewName("/index.html");
    registry.addViewController("/customer-product/**").setViewName("/index.html");
    registry.addViewController("/product-detail/**").setViewName("/index.html");
  }
}
